import React from 'react';
import { Menu, Icon } from 'antd';
const { SubMenu, ItemGroup, Item } = Menu;
class CanvasShape extends React.Component {
    constructor(props) {
        super(props);
    }

    onClick = (e) => {
        console.log(e);
        this.props.onShapeChanged(e.key);
    }
    render() {
        return (
            <Menu
                mode="inline"
                theme={this.props.theme}
                style={{height: this.props.height}}
                onClick={this.onClick}
                // inlineCollapsed={this.props.collapsed}
            >
                <SubMenu key="base" title={<span><Icon type="pie-chart" /><span>基本图形</span></span>}>
                    <Item key="rectangle" onDragStart={this.test}>
                        <span>矩形</span>
                    </Item>
                    <Item key="circle">
                        <span>圆形</span>
                    </Item>
                    <Item key="triangle">
                        <span>三角形</span>
                    </Item>
                </SubMenu>
            </Menu>
        );
    }
}

export {CanvasShape};